<?php
include_once("Constants.php");
include_once("Messages.php");
class H2ADTEAMDataProvider
{
	public static function ExecuteQuery($_sql)
	{
		$_connection = mysql_connect(H2ADTEAMConstant::CONS_SERVER, 
                                     H2ADTEAMConstant::CONS_USERNAME, 
                                     H2ADTEAMConstant::CONS_PASSWORD) or die(H2ADTEAMMessage::CANT_NOT_CONECTDB);

		mysql_select_db(H2ADTEAMConstant::CONS_DB_NAME, $_connection);
        mysql_query("set names 'utf8'",$_connection);       
        mysql_query("SET character_set_client=utf8", $_connection);
        mysql_query("SET character_set_connection=utf8", $_connection);
        mb_language('uni');
        mb_internal_encoding('UTF-8');
        mysql_query("Set names 'utf-8'");
		$_result = mysql_query($_sql, $_connection);

		mysql_close($_connection);

		return $_result;
	}
}

?>